﻿using Castle.MicroKernel.SubSystems.Conversion;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Xml.Linq;
using Abp.Application.Services;

namespace AppFramework.DinosaursParkMes.ProductWork.Dto
{
    public class ProductWorkDto
    {
        public int Id { get; set; }
        /// <summary>
        /// 生产计划编号
        /// </summary>
        [Display(Name = "生产计划编号")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        public string ExplainNumber { get; set; }
        public string WorkOrderSchedule { get; set; }
        /// <summary>
        /// 工单编号
        /// </summary>
        [Display(Name = "工单编号")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        public string WorkOrderNumber { get; set; }
        /// <summary>
        /// 工单名称
        /// </summary>
        [Display(Name = "工单名称")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        public string WorkOrderName { get; set; }
        /// <summary>
        /// 关联计划
        /// </summary>
        [Display(Name = "关联计划")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        public string RelevanceExplain { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        [Display(Name = "产品名称")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        public string ProductName { get; set; }
        /// <summary>
        /// 产品编号
        /// </summary>
        [Display(Name = "产品编号")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        public string ProductNumber { get; set; }
        /// <summary>
        /// 规格型号
        /// </summary>
        [Display(Name = "规格型号")]
        [MaxLength(40)]
        [Column(TypeName = "nvarchar(40)")]
        public string Specification { get; set; }
        /// <summary>
        /// 产品类型
        /// </summary>
        [Display(Name = "产品类型")]
        [MaxLength(40)]
        [Column(TypeName = "nvarchar(40)")]
        public string ProductType { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        [Display(Name = "单位")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        public string Unit { get; set; }
        /// <summary>
        /// 需求日期
        /// </summary>
        [Display(Name = "需求日期")]
        public DateTime DemandDate { get; set; }
        /// <summary>
        /// 计划数量
        /// </summary>
        [Display(Name = "计划数量")]
        [Column(TypeName = "int")]
        public int ExplainNum { get; set; }
        /// <summary>
        /// 实际生产数量
        /// </summary>
        [Display(Name = "实际生产数量")]
        [Column(TypeName = "int")]
        public int AccomplishNum { get; set; }
        /// <summary>
        /// 需求日期
        /// </summary>
        [Display(Name = "计划开工时间")]
        public DateTime ExplainStartDate { get; set; }
        /// <summary>
        /// 需求日期
        /// </summary>
        [Display(Name = "计划完工时间")]
        public DateTime ExplainEndDate { get; set; }
        /// <summary>
        /// 需求日期
        /// </summary>
        [Display(Name = "实际开工时间")]
        public DateTime PracticalStartDate { get; set; }
        /// <summary>
        /// 需求日期
        /// </summary>
        [Display(Name = "实际完工时间")]
        public DateTime PracticalEndDate { get; set; }
        public ProductState State { get; set; } = ProductState.WaitScheduled;
    }

    public class PageDto<T>
    {
        public int PageIndex { get; set; }
        public int PageSize { get; set; }
    }
}
